﻿// --------------------------------------------------------
// <copyright file="HomeController.cs" company="ChiakiYu">
//     Copyright (c) 2015-2017 ChiakiYu.All rights reserved
// </copyright >
// <creation-date>2016-04-27 10:19</creation-date>
// <last-editor>于琦(yu_199012@qq.com)</last-editor>
// <last-date>2017-03-29 16:37</last-date>
// --------------------------------------------------------

using DotNet.Utilities;
using System.Web.Mvc;

namespace MvcDemo.Controllers
{
    public class ViewTestController : Controller
    {

        public class User
        {
            public string Name { get; set; }
        }

        public ActionResult Index()
        {
            ViewData["one"] = "天机老人孙老头";
            ViewBag.Tow = "字母龙凤环，上官金红";
            var _user = new User{ Name = "小李飞刀李寻欢" };
            TempData["Four"] = "嵩阳铁剑郭嵩阳";
            ViewBag.IP = Tools.GetUserIp();
            return View(_user); //等于ViewData.Model=_user
        }


      
    }
}